<?php

namespace Modules\Order\Entities;

use Illuminate\Database\Eloquent\Builder;
use \Modules\Order\Entities\BaseOrder;

use ThrowException;

class ExportOrder extends BaseOrder
{
    protected $guarded = [];
    protected $table = 'orders';

    static public $resourceName = '导出订单';

    protected static function boot()
    {
        parent::boot();

        static::addGlobalScope('exportOrder', function(Builder $builder) {
            $builder->whereIn('type', ['product', 'box', 'package', 'activity', 'vip', 'asset']);
        });
    }
}
